-
-
Notifications
You must be signed in to change notification settings - Fork 33k
gh-138580: add sys.float_info.stdc_iec_559 boolean flag #138811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This value indicating support the IEC 60559 floating-point standard (the Annex F of C99). If enabled, the float type characteristics matches the IEC 60559 double format and exceptional cases for the math's functions follow to the section F.10 of the C99 standard.
I think it would be better if the field was in uppercase but I don't know if we have many other cases like that. |
This will be inconsistent wrt the rest (other field names are also come from macros). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: Victor Stinner <[email protected]>
I'm thinking if it does make sense to mention this flag in cmath docs. We could say that:
|
@picnixz @serhiy-storchaka: What do you think of this change? |
I am not sure what is the best place for this constant. What do @mdickinson and @tim-one think about this? Other options are discussed in the issue. |
I'm not really comfortable with |
This value indicating support the IEC 60559 floating-point standard (the Annex F of C99). If enabled, the float type characteristics matches the IEC 60559 double format and exceptional cases for the math's functions follow to the section F.10 of the C99 standard.
📚 Documentation preview 📚: https://cpython-previews--138811.org.readthedocs.build/
https://cpython-previews--138811.org.readthedocs.build/en/138811/library/sys.html#sys.float_info
https://cpython-previews--138811.org.readthedocs.build/en/138811/library/math.html#math.nan